package com.jack.mizhe.ui.fragmenthelp;

import android.support.v4.app.Fragment;

import com.jack.mizhe.R;
import com.jack.mizhe.ui.ui.mine.MineFragment;
import com.jack.mizhe.ui.ui.shoppingcar.ShoppingCarFragment;
import com.jack.mizhe.ui.ui.team.TeamFragment;
import com.jack.mizhe.ui.ui.today.TodayFragment;


/**
 * Created by JackCheung on 2016/8/20.
 * 此类是用于供mainActivity调用，用于碎片的切换
 */
public class FragmentFactory {
    private  static Fragment fragment;
    public  static Fragment createFragment(int checkedId){
        switch (checkedId){
            case R.id.radioButton_today:
                fragment=new TodayFragment();
                break;
            case R.id.radioButton_nine:
                fragment=new MineFragment();
                break;
            case R.id.radioButton_team:
                fragment=new TeamFragment();
                break;
            case R.id.radioButton_car:
                fragment=new ShoppingCarFragment();
                break;
            case R.id.radioButton_mine:
                fragment=new MineFragment();
                break;

        }


        return fragment;
    }
}
